package com.tiny_wind.tiny_wind_diary.utility;

import java.util.HashMap;
import java.util.Map;

public class ResponseCodeManager {
	
	public static final Integer errorCode_noToken = -100;
	public static final String errorMessage_noToken = "无token";

	public static final Integer errorCode_invalidToken = -101;
	public static final String errorMessage_invalidToken = "无效token";
	
	public static final Integer errorCode_expiredToken = -102;
	public static final String errorMessage_expiredToken = "token已经过期";
	
	public static  Map<Integer,String> map = new HashMap<Integer,String>();
	static {
		map.put(errorCode_noToken, errorMessage_noToken);
		map.put(errorCode_invalidToken,errorMessage_invalidToken);
		map.put(errorCode_expiredToken, errorMessage_expiredToken);
	}
	
	
	public static String getCodeMessage(Integer code) {
		String message = map.get(code);
		return message;
	}
	
}
